<template>
  <div>
    <el-steps :active="99" align-center>
      <el-step
        v-for="(item,i) in procedures"
        :key="i"
        :title="item.ok ? item.procedureName+'(已请验)' : item.procedureName">
        <template slot="icon" v-if="isOneBatch">
          <i style="font-size: 25px;" :class="{'el-icon-success': item.ok,'el-icon-error': !item.ok}" />
        </template>
      </el-step>
    </el-steps>
    <b style="color: #606266;">最近历史记录：</b>
    <el-table :data="dataList" style="width: 100%;padding-top: 15px;">
      <el-table-column label="工序" prop="procedureName" header-align="center" align="center" />
      <el-table-column label="批号" prop="batchNum" header-align="center" align="center" />
      <el-table-column label="请验目的" header-align="center" align="center">
        <template slot-scope="{row}">
          {{ row.isAllTest == 0 ? '全检' : testWay(row.isTest) }}
        </template>
      </el-table-column>
      <el-table-column label="请验人" prop="registCheckUserName" header-align="center" align="center" />
      <el-table-column label="请验时间" header-align="center" align="center">
        <template slot-scope="{row}">
          {{ row.registCheckDate | changeTime }}
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>

export default {
  data() {
    return {
      dataList: [],
      procedures: [],
      isOneBatch: false
    }
  },
  methods: {
    setInfoData(info) {
      this.dataList = info.list
      this.procedures = info.procedures
      this.isOneBatch = info.isOneBatch
    }
  }
}
</script>
